#ifndef DATABASE_EXCEPTIONS_H
#define DATABASE_EXCEPTIONS_H
/*
	Database exceptions

	Generated on 2013-12-27 21:35:04UTC by swallace
*/

#include "exceptions_base.h"


namespace Database
{

class EFieldValue : public ERuntime
{
public:
	EFieldValue() : ERuntime(0x00000001, "Invalid value for field") { };
};


class EFieldValueNull : public ERuntime
{
public:
	EFieldValueNull() : ERuntime(0x00000002, "Field value cannot be NULL") { };
};


class EFieldValueTooLong : public ERuntime
{
public:
	EFieldValueTooLong() : ERuntime(0x00000003, "Field value is too long") { };
};


class EColumnSpec : public ERuntime
{
public:
	EColumnSpec() : ERuntime(0x00001000, "Invalid column specification") { };
};


class ETableNotFound : public ERuntime
{
public:
	ETableNotFound() : ERuntime(0x00002000, "Table not found") { };
};


class ETableDuplicateColumn : public ERuntime
{
public:
	ETableDuplicateColumn() : ERuntime(0x00002001, "Duplicate column in table") { };
};


class EDatabaseDuplicateName : public ERuntime
{
public:
	EDatabaseDuplicateName() : ERuntime(0x00003000, "Duplicate database name") { };
};


class EDatabaseNotFound : public ERuntime
{
public:
	EDatabaseNotFound() : ERuntime(0x00003001, "Database not found") { };
};


class EStringSyntax : public ERuntime
{
public:
	EStringSyntax() : ERuntime(0x00010000, "Syntax error in string") { };
};


class EBadDataDir : public ERuntime
{
public:
	EBadDataDir() : ERuntime(0x00020000, "Invalid data directory") { };
};


class EMemory : public ERuntime
{
public:
	EMemory() : ERuntime(0x0002F000, "Unable to allocate memory") { };
};


class EIllegalValue : public EInternal
{
public:
	EIllegalValue() : EInternal(0x80000000, "Illegal value for variable") { };
};


class ETableNotOpen : public EInternal
{
public:
	ETableNotOpen() : EInternal( 0x80000001, "Table not open") { };
};


class ETableNotClosed : public EInternal
{
public:
	ETableNotClosed() : EInternal(0x80000002, "Table not closed") { };
};


class EMutexInit : public EInternal
{
public:
	EMutexInit() : EInternal(0x80000003, "Failed to initialise mutex") { };
};


class EMutexNotUnlocked : public EInternal
{
public:
	EMutexNotUnlocked() : EInternal(0x80000004, "Mutex destroyed while locked") { };
};


class EMutexLock : public EInternal
{
public:
	EMutexLock() : EInternal(0x80000005, "Failed to lock mutex") { };
};


class EMutexUnlock : public EInternal
{
public:
	EMutexUnlock() : EInternal(0x80000006, "Failed to unlock mutex") { };
};

}	// namespace Database

#endif
